[iPhone] presentModalViewController not working

Posted by ryyst on Stack Overflow See other posts from Stack Overflow or by ryyst
Published on 2010-03-21T15:16:42Z Indexed on 2010/03/21 15:21 UTC
Read the original article Hit count: 344

Filed under:
|

Hi,

here's my code:

ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil];
[self.navigationController presentModalViewController:vc animated:YES];
//[self setView:[vc view]];

If I call it, nothing happens. However, if I change it to:

ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil];
//[self.navigationController presentModalViewController:vc animated:YES];
[self setView:[vc view]];

The view appears just fine (without the transition, of course). What am I doing wrong? Is there anything special you have to take care of when initializing the view controller? I tried to copy as much as possible from Apple's examples, but I can't get this to work...

Thanks for any input!

-- Ry

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiviewcontroller